package com.mall.author.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author: 谢君臣
 * @Date: 2022/8/6-15:33
 * @version: 1.0
 * @function:
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("login");
        registry.addViewController("/login").setViewName("login");
        registry.addViewController("/login.html").setViewName("login");
        registry.addViewController("/registry").setViewName("registry");
        registry.addViewController("/registry.html").setViewName("registry");
//        WebMvcConfigurer.super.addViewControllers(registry);
    }
}
